package org.jeecg.attachment.controller;

import org.jeecg.attachment.dto.req.DownloadFileReqDto;
import org.jeecg.attachment.service.ISysAttachmentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("attachment")
public class AttachmentController {

    @Resource
    private ISysAttachmentService sysAttachmentService;
    
    /**
     * 下载文件
     * @author: qiang.zhou
     * @date: 2025/2/26 16:40
     * @param reqDto 
     * @param response
     * @return void       
     **/
    @GetMapping("downloadImage")
    public void downloadImage(DownloadFileReqDto reqDto, HttpServletResponse response) throws Exception {
        sysAttachmentService.downloadImage(reqDto, response);
    }

}
